package com.dxk.controller;


import com.dxk.mapper.EmployeeMapper;
import com.dxk.pojo.Employee;
import com.dxk.service.DepartmentService;
import com.dxk.service.EmployeeService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RestController;

import java.util.List;

@RestController
public class EmController {


    private EmployeeService employeeService;


    @Autowired
    public void setEmployeeService(EmployeeService Mapper) {
        this.employeeService = Mapper;
    }



    @GetMapping("/hello")
    public  List<Employee> all(){
        List<Employee> allEmployee = employeeService.getAllEmployee();

        return allEmployee;

    }

}
